/**
* This file is part of OntoCompoFramework
*
* Copyright (C) 2011 -  Christian Brel
*
* @author   Main    Christian Brel
**/
package ontocompo.ui.positioning;

import java.awt.Color;
import java.awt.dnd.DropTarget;

import javax.swing.BorderFactory;
import javax.swing.JPanel;

public class RelativePosition extends JPanel {

	private Position position;
	
	public RelativePosition(Position position) {
		super();
		
		this.position = position;
		
		this.setSize(100, 100);
		this.setBackground(Color.CYAN);
		this.setBorder(BorderFactory.createEtchedBorder());
		
		this.setDropTarget(new DropTarget(this, new PositioningDropTarget()));
	}
	
	public RelativePosition(Position position, DropTarget dt) {
		super();
		
		this.position = position;
		
		this.setSize(100, 100);
		this.setBackground(Color.CYAN);
		this.setBorder(BorderFactory.createEtchedBorder());
		
		this.setDropTarget(dt);
	}
	
	public Position getPosition() {
		return this.position;
	}
}
